package com.roundarch.www.model;

import java.util.Date;

import com.roundarch.www.DataEntity;


public class Files extends DataEntity implements Comparable<Files>{
    
	private static final long serialVersionUID = 1L;
	
	private String filename;
    private String notes;
    private String type;
    private byte[] file;
    
    private Date createdDate = new Date();
	
	
   
    public Date getCreatedDate() {
		return createdDate;
	}
	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}


	private Post post;
    
	
	
	public Post getPost() {
		return post;
	}
	public void setPost(Post post) {
		this.post = post;
	}
	public String getFilename() {
		return filename;
	}
	public void setFilename(String filename) {
		this.filename = filename;
	}
	public String getNotes() {
		return notes;
	}
	public void setNotes(String notes) {
		this.notes = notes;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public byte[] getFile() {
		return file;
	}
	public void setFile(byte[] file) {
		this.file = file;
	}


    public int compareTo(Files o) {
    	return o.getCreatedDate().compareTo(createdDate);
    }
}
